<template>
  <div>
  	  <el-submenu v-for="(menu,index) in menus"
      :index="convertIntToString(menu.menusId)" v-if="menu.menusType == 0"
      :key="menu.menusName">
        <template slot="title">
          <i :class="menu.menusIcon"></i>
          <span>{{menu.menusName}}</span>
        </template>
        <manager2 :menus="menu.children"></manager2>
  	  </el-submenu>
  	  <el-menu-item v-for="(menu,index) in menus" :index="convertIntToString(menu.menusId)" v-if="menu.menusType == 1" :key="menu.menusName">
  		<i :class="menu.menusIcon"></i>
      <router-link :to="menu.menusRouter">{{menu.menusName}}</router-link><br>
  	  </el-menu-item>
  </div>
</template>

<script>
  export default{
      name:'manager2',
      props:['menus'],
      methods:{
        convertIntToString(string){
          return string+""
        }
      }
  }
</script>

<style>
</style>
